//
// Created by alexa on 5/2/2024.
//

#include "Soldier.h"

string specToString(Specialization specialization) {
    switch (specialization) {
        case Specialization::Gunner:
            return "Gunner";
        case Specialization::MechanicDriver:
            return "MechanicDriver";
        case Specialization::Commander:
            return "Commander";
        case Specialization::Charger:
            return "Charger";
        default:
            return "Unspecified";
    }
}

string Soldier::getFullname() {
    return firstname + " " + surname;
}

string Soldier::getRank() {
    return rank;
}

void Soldier::setRank(string newValue) {
    this->rank = newValue;
}

Specialization Soldier::getSpecialization() {
    return specialization;
}

void Soldier::setSpecialization(Specialization newValue) {
    this->specialization = newValue;
}

Soldier::Soldier(string firstname, string surname, string rank, Specialization specialization) {
    this->firstname = firstname;
    this->surname = surname;
    this->rank = rank;
    this->specialization = specialization;
}

const string &Soldier::getFirstname() const {
    return firstname;
}

const string &Soldier::getSurname() const {
    return surname;
}
